home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 38 / Amiga Format CD38 (1999-03-15)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-04].iso / -seriously_amiga- / graphics / fv21beta-src / fv.hi < prev    next >
Text File  |  1999-01-25  |  4KB  |  166 lines

  1.     ; /*                                                 C SECTION *************
  2.     IFNE    0
  3.     ; */
  4.  
  5.  
  6.  
  7.  
  8. struct ScreenNode {
  9.   struct Node node;
  10.  
  11.   __aligned ULONG data[11];  /* 44 bytes private to the XXX functions */
  12.  
  13.   /* These are for use by the XXXloader routines and should not be read or modified
  14.      by any other routines */
  15.  
  16.   UBYTE *loaderbuf;
  17.   UBYTE *fileptr;
  18.   ULONG loaderbufsize;   // Size of the buffer in bytes
  19.   BPTR  fh;
  20.   LONG  bytesinloaderbuf;
  21.  
  22.   /* These are fields which give additional information about the picture stored
  23.      on disk.  They are exclusively set by the InitXXX routines, and are read-only */
  24.  
  25.      ULONG bytesperrow; /* size of one row in bytes fresh from the pic-decoder */
  26.      UWORD bytesperpixel;
  27.      UWORD width;       /* these describe the picture on disk */
  28.      UWORD height;
  29.      UWORD depth;       /* 2^depth is not necessarily the number of colors (HAM) */
  30.      UWORD colors;      /* not inited if truecolor = TRUE */
  31.      UWORD aspectx;
  32.      UWORD aspecty;
  33.  
  34.      /* following UBYTE's are TRUE or FALSE */
  35.  
  36.      UBYTE colorinput;  /* CI_PALETTE, CI_GRAY, CI_RGB, CI_HAM, CI_EHB */
  37.  
  38.      UBYTE truecolor;   /* No palette-info; depth 1-8 = gray   depth 15,16,24 = color */
  39.      UBYTE ham;         /* depth 6 = HAM6   depth 8 = HAM8 */
  40.      UBYTE ehb;
  41.      UBYTE planar;
  42.  
  43.      UBYTE pad1;
  44.  
  45.   /* now follows space for a 256-color palette (4 bytes/entry) */
  46.   UBYTE palette[1024];
  47.  
  48.  
  49.   /* These are fields which determine how the data from the decodeXXX function
  50.      will be treated (conversion, scaling).  They are set exclusively by the
  51.      bestmodeid function, and are read-only */
  52.  
  53.      /* following UBYTE's are TRUE or FALSE */
  54.      UBYTE colorconversion;    // 0 (none), CC_FTC, CC_GRAY
  55.  
  56.      UBYTE rerender;
  57.      UBYTE gray;
  58.      UBYTE deep;       /* not set means HAM6/GRAY4, set means HAM8/GRAY8 */
  59.      UBYTE halvewidth;
  60.      UBYTE direct;     /* direct HAM or EHB, if TRUE then rerender must be FALSE */
  61.  
  62.   ULONG modeid;        /* direct from the ScreenChoice structure */
  63.   struct ScrChoice *scrchoice;
  64.  
  65.   WORD  renderaspect;
  66.   ULONG displayid;
  67.   UWORD nominalw;
  68.   UWORD nominalh;
  69.  
  70.   /* following fields are not to be modified by the initXXX or exitXXX routines */
  71.   ULONG lock;       /* lock on the dir this file is located in */
  72.   ULONG buffer;
  73.  
  74.   UWORD renderw;
  75.   UWORD renderh;
  76.   UWORD renderd;
  77.   WORD bestpen; /* color of the best pen for rendering the information text */
  78.  
  79.   UBYTE *buffersmemory;
  80.  
  81.   UBYTE *linebuffer;
  82.   UBYTE *rgbbuffer;
  83.   UBYTE *bytebuffer;
  84.  
  85.   UBYTE *floydbuf1;
  86.   UBYTE *floydbuf2;
  87.  
  88.   UWORD outputline;
  89.  
  90.   /* These are created and released by the openscreen and closescreen functions, and
  91.      are read-only to all except those two routines.  They are uninitialised (zero)
  92.      before openscreen has been called or after closescreen has been called */
  93.  
  94.   struct Screen *screen;
  95.   struct Window *window;
  96.   struct BitMap *tempbm;
  97.  
  98.   /* Same as above, except that these are private and may not be read or modified by
  99.      any routines other than the ones mentioned above */
  100.  
  101.   struct RastPort temprp;
  102.  
  103.   /* A list structure to keep track of buffers with picture data when decoding pictures
  104.      which are not yet to be displayed */
  105.  
  106.   struct List displaydata;
  107.  
  108.   /* Scaling stuff */
  109.  
  110.   WORD scalexfactor,scaleyfactor;   // shifted 12 to the left for accuracy
  111.   WORD scalexcnt,scaleycnt;         // shifted 12 to the left for accuracy
  112.  
  113.   /* filenode pointer */
  114.   struct FileNode *fn;
  115. };
  116.  
  117. struct LineHeader {
  118.   UWORD row;
  119.   UBYTE repeatrow;
  120.   UBYTE pad;
  121. }
  122.  
  123.  
  124.     ; /*                                          ASSEMBLY SECTION *************
  125.     ENDC
  126.  
  127.  
  128.  
  129.  
  130. ERROR_END_OF_STREAM    EQU    27
  131.  
  132.  STRUCTURE ScreenNode,0
  133.   STRUCT sn_Node,LN_SIZE
  134.  
  135.   ALIGNLONG
  136.   STRUCT sn_Data,11*4
  137.  
  138.   APTR  sn_LoaderBuf
  139.   APTR  sn_FilePtr
  140.   APTR  sn_Loaderbufsize
  141.   ULONG sn_fh
  142.   LONG  sn_Bytesinloaderbuf
  143.  
  144.   ULONG sn_BytesPerRow
  145.   UWORD sn_BytesPerPixel
  146.   UWORD sn_Width
  147.   UWORD sn_Height
  148.   UWORD sn_Depth
  149.   UWORD sn_Colors
  150.   UWORD sn_Aspectx
  151.   UWORD sn_Aspecty
  152.  
  153.   LABEL sn_SIZEOF
  154.  
  155.  
  156.  STRUCTURE LineHeader,0
  157.   UWORD lh_Row
  158.   UBYTE lh_Repeatrow
  159.   UBYTE lh_Pad
  160.   LABEL lh_SIZEOF
  161.  
  162.  
  163.  
  164.  
  165.     ; */
  166.